// chatClientDlg.h : header file
//

#if !defined(AFX_CHATCLIENTDLG_H__CD0457CB_1137_4064_81E6_D9DEDEA83308__INCLUDED_)
#define AFX_CHATCLIENTDLG_H__CD0457CB_1137_4064_81E6_D9DEDEA83308__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CChatClientDlg dialog

class CChatClientDlg : public CDialog
{
// Construction
public:
	CChatClientDlg(CWnd* pParent = NULL);	// standard constructor
	void oncl();
	void onrev();

// Dialog Data
	//{{AFX_DATA(CChatClientDlg)
	enum { IDD = IDD_CHATCLIENT_DIALOG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CChatClientDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CChatClientDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnConnect();
	afx_msg void OnSend();
	afx_msg void OnSendfile();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

class csocket : public CSocket
{
public:
	void OnReceive(int n_error) {
		dlg->onrev();
	}
	void OnClose(int n_error) {
		dlg->oncl();
	}
	void setp(CChatClientDlg *serverdlg) {
		dlg = serverdlg;
	}
private:
	CChatClientDlg *dlg;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CHATCLIENTDLG_H__CD0457CB_1137_4064_81E6_D9DEDEA83308__INCLUDED_)
